/* 
	This is the basic sudo code for the Xbee Module
	Most of this code will depend on the 
*/


void XbeeInit(void)
{
	setBaud();	// set the baud rate for serial communication
}

// Next is the data transfer function

void sendServer(char *data)
{
	int packetSize;
	packetSize = sizeof(*data)*sizeof(char);
	// the basic idea here is that we'll receive a character string and send it to the server
	serialTx(Start Delimiter); // 7E in MSIP doc
	serialTx(packetSize);
	serialTx(Channel info);	// first two bytes sent over xbee are the channel info
	
	 // next we'll send the actual string datapacket
	while(*data != '\0')		// while data exists
		serialTx(*data++);	// send the data packet 
	
	serialTx(radius);			// 00 as specified in MSIP
	serialTx(options);		// 00 as specified in MSIP

	 // next we'll send the actual string datapacket
	while(*data != '\0')		// while data exists
		serialTx(*data++);	// send the data packet 

	serialTx(checkSum);		// 0xFF as specified in MSIP
}
